import React from "react"
import { Input } from 'antd';
// close 关闭 dialog，openElse 打开其他 dialog
const AboutUs = ({ dialogProps }) => {
    console.log("进来的数据呢AboutUs", dialogProps)

    const back = () => {
        dialogProps.dispatch({
            type: 'back'
        })
    }
    const openDialog = () => {
        dialogProps.dispatch({
            type: 'open',
            dialogFlag: 'ContactUs',
            dialogProps: {
                data: { name: "标题呢ContactUs" },
                dispatch: dialogProps.dispatch,
                back,
            },

        })
    }


    return <div style={{
        overflow: 'hidden',
        width: '200px',
        height: '130px',
        textAlign: 'center'
    }}>
        <h1>
            About Us
        </h1>
        <Input placeholder="Basic usage" />;
        <div>
            <button onClick={dialogProps.close}>
                close
            </button>
            <button onClick={openDialog} style={{
                marginLeft: '10px'
            }}>
                open else
            </button>
        </div>
    </div>
}

export default AboutUs